package com.blog.blog.mapper;

import com.blog.blog.vo.CommentVO;
import com.blog.blog.dto.CreateCommentDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {

    List<CommentVO> listByArticleId(@Param("articleId") Long articleId);

    int insertComment(CreateCommentDTO dto);

    List<CommentVO> listTopComments(@Param("articleId") Long articleId, @Param("limit") int limit, @Param("offset") int offset);

    List<CommentVO> listChildren(@Param("articleId") Long articleId, @Param("parentIds") List<Long> parentIds);

    long countTopComments(@Param("articleId") Long articleId);
    
    // 邮件通知相关
    CommentVO selectById(@Param("id") Long id);
}


